@import "../../colors";
@import "../../frameless";

$base-bg: $ui-white;

#view {
    background-color: $ui-gray;
    padding: 0;
}

.outer {
    .title-banner {
        &.masthead {
            margin-bottom: 0;
            background-color: $ui-blue-dark;
            padding: 0;

            h1 {
                text-align: center;
                color: $ui-white;
                font-size: 3rem;
            }

            p {
                margin: 0;
                width: $cols6;
                text-align: left;
                color: $ui-white;

                a {
                    border-bottom: 1px solid $ui-white;
                    color: $ui-white;
                }
            }
        }
    }

    .search {
        margin: 0 auto;
        border-right: 0;
        width: $cols6;
        color: $type-white;

        .form {
            margin: 0;
        }

        .row {
            .help-block {
                display: none;
            }
        }

        .input,
        .button {
            display: inline-block;
            margin-top: 5px;
            outline: none;
            border: 0;
            background-color: $active-gray;
            height: 14px;

            &[type=text] {
                transition: .15s ease background-color;
                padding: 0;
                padding-right: 10px;
                padding-left: 40px;
                width: calc(100% - 50px);
                height: 40px;
                color: $type-white;
                font-size: .85em;

                &::placeholder {
                    $placeholder-transparent: rgba(255, 255, 255, .75);
                    color: $placeholder-transparent;
                }

                &:focus {
                    transition: .15s ease background-color;
                    background-color: $active-dark-gray;
                }

                .ie9 & {
                    width: 70px;
                }
            }
        }

        .btn-search {
            position: absolute;

            box-shadow: none;
            background-color: transparent;
            background-image: url("/images/nav-search-glass.png");
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 14px 14px;

            width: 40px;
            height: 40px;

            &:hover {
                box-shadow: none;
            }
        }
    }
    
    /* HACK: sort controls are terrible. There's some sort of magic formula for height of formsy components that I can't control. */

    .sort-controls {
        display: flex;
        margin: 0 auto;
        border-bottom: 1px solid $ui-border;
        padding: 8px 0;
        width: 58.75rem;
        justify-content: space-between;
    }

    .sort-mode {
        margin-top: -4px;
        width: 13.75rem;

        .select {

            select {
                margin-bottom: 0;
                border: 0;
                background-color: transparent;
                height: 32px;
                color: $header-gray;

                &:focus,
                &:active {
                    background-color: transparent;
                }
            }

            .help-block {
                display: none;
            }
        }
    }

    .tab-background {
        box-shadow: 0 0 1px $box-shadow-gray;
        background-color: $ui-white;
        width: 100%;
    }

    #projectBox {
        margin-top: 16px;
        background-color: $ui-gray;
        padding-bottom: 32px;
        width: 100%;

        .button {
            display: block;
            margin: 0 auto;
            width: 58.75rem;
        }

        .search-prompt {
            margin: 0 auto;
            padding: 30px;
            max-width: 500px;
            text-align: center;
        }
    }
}

//4 columns
@media #{$small} {
    .outer {
        .search {
            width: $cols4;

            .btn-search {
                left: 40px;
            }
        }

        .tabs {
            width: $cols4;
        }

        .sort-controls {
            width: $cols4;
        }

        #projectBox {
            .button {
                width: $cols4;
          }
        }
    }
}


//6 columns
@media #{$medium} {
    .outer {
        .tabs {
            width: $cols6;
        }

        .sort-controls {
            width: $cols6;
        }

        #projectBox {
            .button {
                width: $cols6;
          }
        }
    }
}

// 8 columns
@media #{$intermediate} {
    .outer {
        .tabs {
            width: $cols8;
        }

        .sort-controls {
            width: $cols8;
        }

        #projectBox {
            .button {
                width: $cols9;
          }
        }
    }
}
